package leetcode_2401_2500;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

public class LeeCode_2465 {
    public static void main(String[] args) {

    }
    private static int distinctAverages(int[] nums) {
        Arrays.sort(nums);
        Set<Double> set = new HashSet<>();
        int l = 0, r = nums.length - 1;
        while (l < r){
            set.add(((double)nums[l] + nums[r]) / 2);
            l++;
            r--;
        }
        return set.size();
    }
}
